<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>v-model结合select类型使用</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id ="app"> 
    <!-- 1.下拉单选 -->
    喜爱水果：
    <select name="abc" v-model="fruit">
      <option value="苹果" >苹果</option>
      <option value="香蕉" >香蕉</option>
      <option value="西瓜" >西瓜</option>
      <option value="桃子" >桃子</option>
      <option value="芒果" >芒果</option>
    </select>
    <h2>您选择的水果是： {{fruit}}</h2>

    喜爱多种水果(鼠标选中下拉)：
    <select name="abc" v-model="fruits" multiple>
      <option value="苹果" >苹果</option>
      <option value="香蕉" >香蕉</option>
      <option value="西瓜" >西瓜</option>
      <option value="桃子" >桃子</option>
      <option value="芒果" >芒果</option>
    </select>
    <h2>您选择的水果是： {{fruits.toString()}}</h2>
  </div>

  <script>
   var vm = new Vue({
    el: '#app',
    data: {
      fruit: '香蕉',
      fruits: []
    },
    methods: {
      
    }
   });
  </script>
</body>

</html>